package com.googlecode.phpunit4eclipse.j2phpunit.runner.api;

import java.util.ArrayList;
import java.util.List;

public class PHPUnitTestDescription {

	private Class<?> testedClazz;
	
	private String name;

	private List<PHPUnitTestDescription> childs;
	
	private PHPUnitTestDescription parent;
	
	public PHPUnitTestDescription(Class<?> testedClazz, String name) {
		this.testedClazz = testedClazz;
		this.name = name;
		this.childs = new ArrayList<PHPUnitTestDescription>();
		this.parent = null;
	}

	public PHPUnitTestDescription(String name) {
		this(null, name);
	}

	public Class<?> getTestedClazz() {
		return testedClazz;
	}

	public String getName() {
		return name;
	}
	
	public void addChild(PHPUnitTestDescription phpUnitTestDescription) {
		childs.add(phpUnitTestDescription);
		phpUnitTestDescription.parent = this;
	}
	
	public PHPUnitTestDescription getParent() {
		return parent;
	}
	
}
